package cn.edu.lzzy;

import java.util.Comparator;
import cn.edu.lzzy.GameCharacters;

public class RoleSkillsComparator implements Comparator<GameCharacters>,java.io.Serializable {
    public int compare(GameCharacters o1, GameCharacters o2) {
//        比较技能伤害
        int SkillDamage=o1.SkillDamage();
        int SkillDamage2 = o2.SkillDamage();

        if (SkillDamage < SkillDamage2 )
            return -1;
        else if (SkillDamage == SkillDamage2)
            return 0;
        else
            return 1;
    }
}


